package com.bt7274.mapper;

import com.bt7274.pojo.Forum;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 社区版块表：记录社区拥有板块 Mapper 接口
 * </p>
 *
 * @author hp
 * @since 2025-03-25
 */
public interface ForumMapper {

    int insertForum(Forum forum);

    int deleteForumById(@Param("id") String id);

    int updateForumName(@Param("id") String id, @Param("newName") String newName);
    int updateForumDescription(@Param("id") String id, @Param("description") String description);

    int updateParentId(@Param("id") String id, @Param("newParentId") String newParentId);

    List<Forum> selectAllForums();

    Forum selectForumById(@Param("id") String id);
}

